<%@ page language="java" import="java.util.*" contentType="text/html;charset=utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<%@ taglib uri="/struts-tags" prefix="s"%>
<script type="text/javascript" src="<%=basePath %>js/jquery.js"></script>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>考试系统</title>
<style type="text/css">
<!--
body {
	margin-left: 3px;
	margin-top: 0px;
	margin-right: 3px;
	margin-bottom: 0px;
}
.STYLE1 {
	color: #e1e2e3;
	font-size: 12px;
}
.STYLE6 {color: #000000; font-size: 12; }
.STYLE10 {color: #000000; font-size: 12px; }
.STYLE19 {
	color: #344b50;
	font-size: 12px;
}
.STYLE21 {
	font-size: 12px;
	color: #3b6375;
}
.STYLE22 {
	font-size: 12px;
	color: #295568;
}
-->
</style>

<script language="JavaScript">

	function del(id,role){
		var id = id ;
		var role = role;
		if(confirm("是否确定删除")){
			todel(id,role)
		}
	}
	
	function todel(id,role){
		var flag = null;
		if(role==1)
			flag = "teacher";
		window.location.href="<%=request.getContextPath()%>/Admin/AdminAction!delUser.action?id="+id+"&flag="+flag;
	}
</script>

</head>
<body>

	
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="30"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td height="24" bgcolor="#353c44"><table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td width="6%" height="19" valign="bottom"><div align="center"><img src="images/tb.gif" width="14" height="14" /></div></td>
                <td width="94%" valign="bottom"><span class="STYLE1"> 用户信息修改</span></td>
              </tr>
            </table>
            </td>
          </tr>
        </table></td>
      </tr>
    </table></td>
  </tr>
  <tr>
  <td>
    <form action="../UserAction!toInfo.action?flag=user" method="post">
	<table width="20%" border="0" cellpadding="0" cellspacing="1" bgcolor="#a8c7ce">
		<tr>
			 <td width="40%" height="20" bgcolor="d3eaef" class="STYLE6"><div align="center"><span class="STYLE10" >用户ID</span></div></td>
			 <td height="20" bgcolor="#FFFFFF" class="STYLE19"><div align="center"><input type="text" readonly name="user.id" value="<s:property value="user.id" />" align="center" /></div></td>
		</tr>
		<tr>
			 <td width="40%" height="20" bgcolor="d3eaef" class="STYLE6"><div align="center"><span class="STYLE10">角色</span></div></td>
			 <td height="20" bgcolor="#FFFFFF" class="STYLE19"><div align="center">  <input type="text" readonly name="user.role" value="<s:property value="user.role" />"  style="display:none"/>
			 <s:if test="user.role==0">学生</s:if>
			 <s:elseif test="user.role==1">教师</s:elseif>
			 
			 </div></td>
		</tr>
		<tr>
			 <td width="40%" height="20" bgcolor="d3eaef" class="STYLE6"><div align="center"><span class="STYLE10">用户名</span></div></td>
			 <td height="20" bgcolor="#FFFFFF" class="STYLE19"><div align="center"><input type="text" readonly name="user.username" value="<s:property value="user.username" />" /></div></td>
		</tr>
		<tr>
			 <td width="40%" height="20" bgcolor="d3eaef" class="STYLE6"><div align="center"><span class="STYLE10">真实姓名</span></div></td>
			 <td height="20" bgcolor="#FFFFFF" class="STYLE19"><div align="center"><input type="text" name="user.realname" value="<s:property value="user.realname" />" /></div></td>
		</tr>
		<tr>
			 <td width="40%" height="20" bgcolor="d3eaef" class="STYLE6"><div align="center"><span class="STYLE10">密码</span></div></td>
			 <td height="20" bgcolor="#FFFFFF" class="STYLE19"><div align="center"><input type="text" name="user.userpassword" value="<s:property value="user.userpassword" />" /> </div></td>
		</tr>
		<tr>
			 <td width="40%" height="20" bgcolor="d3eaef" class="STYLE6"><div align="center"><span class="STYLE10">电话</span></div></td>
			 <td height="20" bgcolor="#FFFFFF" class="STYLE19"><div align="center"><input type="text" name="user.tel" value="<s:property value="user.tel" />" /> </div></td>
		</tr>
		<tr>
			 <td width="40%" height="20" bgcolor="d3eaef" class="STYLE6"><div align="center"><span class="STYLE10">学号/工号</span></div></td>
			 <td height="20" bgcolor="#FFFFFF" class="STYLE19"><div align="center"><input type="text" name="user.stunum" value="<s:property value="user.stunum" />" /> </div></td>
		</tr>
		<tr>
			 <td width="40%" height="20" bgcolor="d3eaef" class="STYLE6"><div align="center"><span class="STYLE10">学院</span></div></td>
			 <td height="20" bgcolor="#FFFFFF" class="STYLE19"><div align="center"><input type="text" name="user.college" value="<s:property value="user.college" />" /> </div></td>
		</tr>
		<tr>
			 <td width="40%" height="20" bgcolor="d3eaef" class="STYLE6"><div align="center"><span class="STYLE10">专业</span></div></td>
			 <td height="20" bgcolor="#FFFFFF" class="STYLE19"><div align="center"><input type="text" name="user.major" value="<s:property value="user.major" />" /> </div></td>
		</tr>
		<tr>
			 <td width="40%" height="20" bgcolor="d3eaef" class="STYLE6"><div align="center"><span class="STYLE10">Email</span></div></td>
			 <td height="20" bgcolor="#FFFFFF" class="STYLE19"><div align="center"><input type="text" name="user.email" value="<s:property value="user.email" />" /> </div></td>
		</tr>
		<tr>
			 <td width="40%" height="20" bgcolor="d3eaef" class="STYLE6"><div align="center"><span class="STYLE10">QQ</span></div></td>
			 <td height="20" bgcolor="#FFFFFF" class="STYLE19"><div align="center"><input type="text" name="user.qq" value="<s:property value="user.qq" />" /> </div></td>
		</tr>
		
		<tr>
			  <td height="20" bgcolor="#FFFFFF" class="STYLE19"><div align="center"> <input type="button" value="删除" onclick="del(<s:property value="user.id" />,<s:property value="user.role" />)">  </div></td>
			  <td height="20" bgcolor="#FFFFFF" class="STYLE19"><div align="center"> <input type="submit" value="提交"></div></td>
		</tr>
		<tr>${info}</tr>
	</table>
	</form>
	
  </td>
  </tr>
</table>	
    		

</body>
</html>
